import * as types from './types';
import api from '../data/api';

const state = {
    redPackData:{
        id:'',
        tender:0,
        reward:0
    }
}

const getters = {
    redPackData: state => state.redPackData
};

const actions = {
    setRedPack({ commit }, res) {
        commit(types.INVEST_RED_PACK, res)
    }
}

const mutations = {
    [types.INVEST_RED_PACK](state, res) {
        state.redPackData = res;
    }
}

export default {
    state,
    actions,
    getters,
    mutations
}
